package com.ie.controller.before;

import com.ie.common.http.ResponseResult;
import com.ie.common.security.anno.AuthIgrone;
import com.ie.entity.FocusEntity;
import com.ie.entity.GoodsEntity;
import com.ie.sevice.admin.GoodsService;
import com.ie.sevice.before.FocusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @classname: FocusContoller
 * @Author: S2
 * @Description: //TODO
 * @Date: 2025/5/29  8:23
 * @Param:
 * @version: 1.0
 **/
@RestController
@RequestMapping("/api/before/focus")
public class FocusContoller {
    @Autowired
    private FocusService focusService;
    @Autowired
    GoodsService goodsService;

    // @AuthIgrone// TODO debug
    @PostMapping("/add")
    public ResponseResult<Map<String, Object>> addFocus(@RequestBody FocusEntity focusEntity) {
        return focusService.addFocus(focusEntity);
    }

// @AuthIgrone// TODO debug
@PostMapping("/getMyFocusGoods")
    public ResponseResult<Map<String, Object>> getMyFocusGoods(@RequestBody GoodsEntity goodsEntity) {
        return goodsService.iPageMyFocusGoods(goodsEntity);
    }
}
